<?php
$config = array_merge($config, array());
isset($config['timezone']) ? date_default_timezone_set($config['timezone']) : date_default_timezone_set('UTC');
!defined('_DIRECTORY_APP') && define('_DIRECTORY_APP', dirname(__FILE__));
!defined('_DIRECTORY_LIB') && define('_DIRECTORY_LIB', dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'lib');
!defined('_DIRECTORY_VAR') && define('_DIRECTORY_VAR', dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'var');
!defined('_DIRECTORY_SETTING') && define('_DIRECTORY_SETTING', dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'setting');
require_once _DIRECTORY_LIB . DIRECTORY_SEPARATOR . 'system' . DIRECTORY_SEPARATOR . 'loader.php';
system_loader::getInstance()->setBaseDir(_DIRECTORY_LIB);
isset($config['db']) && system_db::factory($config['db']);
